Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String Enum Fix #17

Merged
merged 3 commits into from
Sep 18, 2024
Merged

String Enum Fix #17

merged 3 commits into from
Sep 18, 2024

Conversation

marklundin
Copy link
Member

Fixes an issue with string enums that would return an incorrect value. Previously when parsing the following script

/** @enum */
const StringEnum = { A = "a"  }

class MyScript {
  /** 
   * @attribute
   * @type {StringEnum}
   */
   str;
}

The parser would return this enum schema { enum: [{ A : '"a"'}]} (notice the 'a' wrapped in nested quotations)

This PR fixes this and adds missing tests around this case.

@marklundin marklundin requested review from kpal81xd and a team and removed request for kpal81xd September 18, 2024 15:50
@marklundin marklundin self-assigned this Sep 18, 2024
Copy link
Collaborator

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excelent!

@marklundin marklundin merged commit 1d01c9e into main Sep 18, 2024
1 check passed
@marklundin marklundin deleted the fix-string-enum branch September 18, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants